package com.oneonefive.trainticketsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.oneonefive.trainticketsystem.pojo.Sale;
import org.apache.ibatis.annotations.Mapper;

import java.sql.Timestamp;
import java.util.List;


@Mapper
public interface SaleMapper extends BaseMapper<Sale> {
    boolean insertSale(Integer saleId, Integer ticketId, Timestamp saleTime, Integer userId);

    List<Sale> selectAllSale(Integer saleId, Integer ticketId, Integer userId, int rowCount);

    int getSaleRowCount(Integer saleId, Integer ticketId, Timestamp saleTime, Integer userId);

    void deleteByTicketId(Integer ticketId);
}




